<?php
	header("Content-Type: text/html;charset=utf-8");
	include("../function/_nosql.php"); //
	include("../function/function.php");
	$action = chkstr(trim($_REQUEST['action']));
	$user_phone = chkstr(trim($_REQUEST['user_phone']));
	if(!isMobile($user_phone)){
		echo "手机号格式错误！"; // 用户名格式不正确
		exit();
	}
	$PhoneCode = randomkeys(6);
	$is_reguser = getNewsNums("kboy_user","user_phone='$user_phone'");
	

	$_SESSION['PhoneName'] = "";
	$_SESSION['PhoneCode'] = "";
?>
<div class="award-box">
    <div class="award-hd">
        <div class="award-tips" style="text-align: center;"><img src="../images/confirm.png" alt=""/></div>
        <div class="award-notice" style="font-size: 18px;line-height: 30px;color: #454444;word-break: break-all;margin-top: 10px;">验证码我们已经通过短信形式发送到</br>您的手机号<?=$user_phone?>，请注意查收！</div>
        <span class="rect"></span>
    </div>
</div>
<?php
	$PhoneState = POST_MESSAGE($user_phone,"您的验证码是".$PhoneCode);
	if($PhoneState != 0){
		echo erro("验证码发送失败");
	}else{
		$_SESSION['PhoneName'] = $user_phone;
		$_SESSION['PhoneCode'] = $PhoneCode;
	}
?>